package yf.mall.vo.up;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.SneakyThrows;
import org.springframework.util.StringUtils;
import yf.mall.entity.UserEntity;

import java.lang.reflect.Field;
import java.util.Date;

@Data
public class UserUp extends Up{

    @ExcelProperty(index = 0)
    private Long id;

    //微信头像
    @ExcelProperty(index = 1)
    private String avatar;

    @ExcelProperty(index = 2)
    private String openId;

    //手机号码
    @ExcelProperty(index = 3)
    private String mobile;
    //密码
    @ExcelProperty(index = 4)
    private String password;
    //名称
    @ExcelProperty(index = 5)
    private String name;
    //编码
    @ExcelProperty(index = 6)
    private String code;
    //
    @ExcelProperty(index = 7)
    private String level;
    //上级ID
    @ExcelProperty(index = 8)
    private Long pid;
    //加入时间
    @ExcelProperty(index = 9)
    private Date time;
    //备注
    @ExcelProperty(index = 10)
    private String remark;

    //ENUM-状态:"ACTIVE-正常","BAN-禁用"
    @ExcelProperty(index = 11)
    private Integer status;



    public static void main(String[] args) {
        UserUp userUp = new UserUp();
        userUp.setId(1L);
        UserEntity user = new UserEntity();
        System.out.println(userUp.toEntity(user).getId());

    }

}
